#pragma once
#include "TokenStream.h"
#include "Bird.h"
#include <string>
#include <vector>
using namespace std;

class CInterpreter
{
public:
	enum ERRORS
	{
		INTERPRET_ERROR,
		BAD_WHILE_SYNTAX,
		NOT_EXISTING_COMMAND
	};
	CInterpreter(vector<int> &tokenStream, CBird * bird);
	~CInterpreter(void);
	void interpret();
	
protected:
	void doAction(const vector<int> &expression);
	void startComand(int command);
	void startRepetition(const vector<int> &expression);
	void fly();
	void right();
	void quack();
	void echoErrors();
private:
	vector<int> m_tokenStream;
	vector<int> m_variablesValues;
	vector<ERRORS> m_errors;
	CBird * m_bird;
};
